package com.admin.core.mapper;

import com.admin.core.entity.SysDept;
import com.admin.core.entity.SysRoleDept;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author sq-lan
 */
@Mapper
public interface RoleDeptMapper extends BaseMapper<SysRoleDept> {

    List<SysDept> listDeptByRoleId(int id);

    /**
     * 插入数据
     *
     * @param roleId   角色id
     * @param deptList deptList
     */
    void insertData(@Param("roleId") int roleId, @Param("deptList") List<SysDept> deptList);

}
